<template>
  <view class="card">
    <view class="card-header" v-if="$slots.header">
      <slot name="header"></slot>
    </view>
    <view class="card-body">
      <slot name="body"></slot>
    </view>
    <view class="card-footer" v-if="$slots.footer">
      <slot name="footer"></slot>
    </view>
  </view>
</template>

<script>
export default {
  name: 'HxkCard'
}
</script>

<style scoped lang="scss">
.card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  //margin: 16px;

  .card-header,
  .card-footer {
    padding: 16px;
    font-weight: bold;
  }
  .card-header {
    border-bottom: 1px solid #f0f0f0;
  }
  .card-footer {
    border-top: 1px solid #f0f0f0;
  }
  .card-body {
    padding: 16px;
  }
}

</style>
